package cn.sh.library.gmwx.service.hsly.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.sh.library.gmwx.bean.ArchitectureSearchBean;
import cn.sh.library.gmwx.dto.Pager;
import cn.sh.library.gmwx.dto.QueryResult;
import cn.sh.library.gmwx.service.hsly.ArchitectureService;
import cn.sh.library.gmwx.sparql.hsly.ArchitectureSparql;

@Service
public class ArchitectureServiceImpl implements ArchitectureService {
	
	@Resource
	private ArchitectureSparql architectureSparql;

	@Override
	public List<Map<String, Object>> getArchitecture(ArchitectureSearchBean search, Pager pager) {
		QueryResult<Map<String, Object>> _list = architectureSparql
				.getArchitectureList(search, pager.getStartIndex(),
						pager.getPageSize());

		pager.calcPageCount((_list).getTotalrecord());

		return _list.getResultList();
	}

	@Override
	public Map<String, Object> architecture_detail(String Uri) {
		
		return architectureSparql.getArchitectureDetail(Uri);
	}

	@Override
	public List<Map<String, String>> getRDF(String g, String uri) {
		
		return architectureSparql.getRDF(g, uri);
	}

}
